Page({
  data: {
    list: []
  },
  onShow() {
    this.getRepair()
  },
  async getRepair() {
    let res = await wx.http.get('/repair')
    this.setData({
      list: res.rows
    })
  },
  goDetail(event) {
    wx.navigateTo({
      url: '/repair_pkg/pages/detail/index?id=' + event.mark.id,
    })
  },
  addRepair() {
    wx.navigateTo({
      url: '/repair_pkg/pages/form/index',
    })
  },
})
